<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form method="post" enctype="multipart/form-data" id="file_upload" action="/file_upload">
    <p>图片预览：</p>
    <img id="image-preview">
    <p>
        <input type="file" id="file"  name="photoForm" accept="image/gif, image/jpeg, image/png, image/jpg">

    </p>
    <p>
        <input type="file" id="file2" name="photoForms" accept="image/gif, image/jpeg, image/png, image/jpg" multiple>

    </p>
    <button type="submit">提交</button>
</form>

</body>
<style>
    #image-preview {
        border: 1px solid #ccc;
        width: 100%;
        height: 100%;
        max-width: 200px;
        max-height: 200px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center center;
    }
</style>
</html>